<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>抖音网页版示例</title>
    <link rel="stylesheet" href="styles.css"> <!-- 你可以将样式放在外部CSS文件中 -->
    <style>
        /* 基本样式重置和布局 */
        body, html {
            margin: 0;
            padding: 0;
            font-family: Arial, sans-serif;
        }
        .container {
            width: 80%;
            margin: 0 auto;
            padding: 20px;
        }
        header {
            background-color: #ff2d55;
            color: white;
            padding: 15px 0;
            text-align: center;
        }
        nav {
            display: flex;
            justify-content: space-between;
            align-items: center;
            background-color: #fff;
            padding: 10px 0;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }
        nav .logo {
            font-size: 24px;
            font-weight: bold;
        }
        nav ul {
            list-style: none;
            display: flex;
            margin: 0;
            padding: 0;
        }
        nav ul li {
            margin-left: 20px;
        }
        nav ul li a {
            text-decoration: none;
            color: #333;
        }
        nav ul li a:hover {
            text-decoration: underline;
        }

        /* 视频列表和单个视频样式 */
        .video-list {
            display: flex;
            flex-wrap: wrap;
            justify-content: space-between;
            margin-top: 20px;
        }
        .video-item {
            width: calc(33.333% - 20px);
            margin-bottom: 20px;
            background-color: #f0f0f0;
            border-radius: 8px;
            overflow: hidden;
            position: relative;
        }
        .video-item img {
            width: 100%;
            height: auto;
        }
        .video-item .info {
            padding: 10px;
        }
        .video-item .info h3 {
            margin: 0;
            font-size: 16px;
            color: #333;
        }
        .video-item .info p {
            margin: 5px 0 0;
            font-size: 14px;
            color: #666;
        }
        .video-item .like-btn,
        .video-item .comment-btn {
            position: absolute;
            top: 10px;
            right: 10px;
            background-color: rgba(255, 45, 85, 0.7);
            color: white;
            border: none;
            padding: 5px 10px;
            border-radius: 4px;
            cursor: pointer;
        }
        .video-item .comment-btn {
            right: 60px;
        }

        /* 评论区样式 */
        .comments {
            margin-top: 20px;
        }
        .comments h3 {
            margin-bottom: 10px;
            font-size: 16px;
        }
        .comment {
            display: flex;
            align-items: center;
            margin-bottom: 10px;
            padding: 10px;
            background-color: #fff;
            border-radius: 4px;
            box-shadow: 0 1px 2px rgba(0,0,0,0.1);
        }
        .comment img {
            border-radius: 50%;
            width: 40px;
            height: 40px;
            margin-right: 15px;
        }
        .comment-text {
            flex-grow: 1;
        }
        .comment-text p {
            margin: 0;
            font-size: 14px;
        }
        .comment-form {
            display: flex;
            margin-top: 10px;
        }
        .comment-form input[type="text"] {
            flex-grow: 1;
            padding: 10px;
            border: 1px solid #ccc;
            border-radius: 4px;
            margin-right: 10px;
        }
        .comment-form button {
            padding: 10px 20px;
            border: none;
            background-color: #ff2d55;
            color: white;
            border-radius: 4px;
            cursor: pointer;
        }

        /* 响应式设计 */
        @media (max-width: 768px) {
            .video-item {
                width: calc(50% - 20px);
            }
        }
        @media (max-width: 480px) {
            .video-item {
                width: 100%;
            }
        }
    </style>
</head>
<body>
    <div class="container">
        <header>
            <h1>抖音网页版</h1>
        </header>
        <nav>
            <div class="logo">抖音</div>
            <ul>
                <li><a href="#">首页</a></li>
                <li><a href="#">发现</a></li>
                <li><a href="#">消息</a></li>
                <li><a href="#">个人</a></li>
            </ul>
        </nav>
        <div class="video-list">
            <div class="video-item">
                <img src="https://via.placeholder.com/300x200" alt="视频封面">
                <div class="info">
                    <h3>视频标题1</h3>
                    <p>作者：用户1</p>
                </div>
                <button class="like-btn">点赞</button>
                <button class="comment-btn">评论</button>
                <div class="comments">
                    <h3>评论</h3>
                    <div class="comment">
                        <img src="https://via.placeholder.com/40" alt="用户头像">
                        <div class="comment-text">
                            <p>用户2: 这是一个很好的视频！</p>
                        </div>
                    </div>
                    <div class="comment-form">
                        <input type="text" placeholder="写评论...">
                        <button>发送</button>
                    </div>
                </div>
            </div>
            <!-- 你可以复制上面的.video-item元素来添加更多视频 -->
            <div class="video-item">
                <img src="https://via.placeholder.com/300x200" alt="视频封面">
                <div class="info">
                    <h3>视频标题2</h3>
                    <p>作者：用户2</p>
                </div>
                <button class="like-btn">点赞</button>
                <button class="comment-btn">评论</button>
                <div class="comments">
                    <h3>评论</h3>
                    <!-- 可以在这里添加更多评论 -->
                    <div class="comment-form">
                        <input type="text" placeholder="写评论...">
                        <button>发送</button>
                    </div>
                </div>
            </div>
            <div class="video-item">
                <img src="https://via.placeholder.com/300x200" alt="视频封面">
                <div class="info">
                    <h3>视频标题3</h3>